package com.warren.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.warren.dao.BannerMapper;
import com.warren.entity.TmWxmpBanner;
import com.warren.entity.User;
import com.warren.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version V1.0
 * @Description:
 * @author: warren
 * @date: 2022/7/14$ 22:10$
 */
@Service
public class BannerServiceImpl implements BannerService {
    @Autowired
    BannerMapper bannerMapper;

    @Override
    public List<TmWxmpBanner> getList() {
        QueryWrapper<TmWxmpBanner> userQueryWrapper = new QueryWrapper<>();
        List<TmWxmpBanner> tmWxmpBanners = bannerMapper.selectList(userQueryWrapper);
        return tmWxmpBanners;
    }

    @Override
    public TmWxmpBanner view(Long id) {
        return bannerMapper.selectByPrimaryKey(id);
    }
}
